Discover gists
| #EXTM3U | |
| #EXTINF:0,Radio France - FIP (AAC+Metadata) | |
| http://radio-metadata.fr:8000/fip.m3u | |
| #EXTINF:0,Radio France - FIP Reggae (AAC+Metadata) | |
| http://radio-metadata.fr:8000/fipreggae.m3u | |
| #EXTINF:0,Radio France - FIP Cultes (AAC+Metadata) | |
| http://radio-metadata.fr:8000/fipcultes.m3u | |
| #EXTINF:0,Radio France - FIP World (AAC+Metadata) | |
| http://radio-metadata.fr:8000/fipmonde.m3u | |
| #EXTINF:0,Radio France - FIP Nouveautés (AAC+Metadata) |
(Better yet, use oMLX instead.)
This is mostly written for a base 2022 M1 Max Mac Studio with 32GB of RAM. The goal is so that you can run models like gemma3:27b-it-qat or Mistral Small 22B/24B variants (e.g., mistral-small3.1) reasonably well. This more or less involves...
- Setting your "VRAM" allocation to 24GB.
- Enabling Flash Attention.
- Enabling KV cache quantization.
You could certainly run something like this then restart Ollama for it to work:
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.
| import json,sys;from subprocess import getoutput as sh;from urllib.request import Request as R,urlopen | |
| url=sys.argv[1];h=[];b=dict(model="gpt-5.6",input=h,tools=[dict(type="custom",name="sh")]) | |
| while p:=input("> "): | |
| h+=[dict(role="user",content=p)];H={"Content-Type":"application/json"} | |
| while True: | |
| o=(r:=json.load(urlopen(R(url,json.dumps(b).encode(),H))))["output"] | |
| h+=o;c=[i for i in o if i["type"]=="custom_tool_call"];z=r["usage"]["total_tokens"]/10500 | |
| if not c:print(o[-1]["content"][0]["text"],f'\n[{z:06.3f}%]');break | |
| h+=[dict(type="custom_tool_call_output",call_id=i["call_id"],output=sh(i["input"])) for i in c] |
| import json | |
| import sys | |
| from subprocess import getoutput as run_shell | |
| from urllib.request import Request, urlopen | |
| MODEL = "gpt-5.6" | |
| CONTEXT_WINDOW_TOKENS = 1_050_000 | |
| endpoint_url = sys.argv[1] | |
| history = [] |
| name | cognitive-rhythm-writing |
|---|---|
| description | 説明的な文章に緩急を設計するための規範。緩急を装飾ではなく認知モードの切替(観察→逡巡→断定→再観察)と未回収の緊張の管理として扱い、文の拍、段落の密度波形、節の入り方、緩みと駄文の判別、執筆後の機械的な点検手順を定める。読み物として読ませたい章・記事・解説文を生成するとき、または「密度はあるが平坦でおもしろくない」文章を診断・修正するときに使用する。 |
密度の高い文章が退屈になるのは、情報が多いからではなく、全文が同じ認知モードで書かれているからである。 この規範は、読者の認知モード(観察する、迷う、確信する、確かめ直す)を意図的に切り替え、常に「続きを読む理由」を維持することで、読み進める推進力を作る。
Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[